<!--{eval $_TPL['titles'] = array(getstr($pic['title'], 60, 0, 0, 0, 0, -1), $album['albumname'], '相册');}-->
<!--{template header}-->

<div class="c_header a_header">
	<a href="space.php?uid=$space[uid]"><img src="<!--{avatar($space[uid],small)}-->" alt="$space[username]" class="avatar" /></a>
	<h1>相册<em> &nbsp;- $album[albumname]</em></h1>
	<a href="space.php?uid=$space[uid]" class="spacelink"><!--{if $space[self]}-->我<!--{else}-->$space[username]<!--{/if}-->的空间</a>
</div>

<div class="h_status">
	<div class="r_option"><a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=up">上一张</a><span class="pipe">|</span><a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=down" id="nextlink">下一张</a><span class="pipe">|</span><!--{if $_GET['play']}--><a href="javascript:;" id="playid" onclick="playNextPic(false);">停止播放</a><!--{else}--><a href="javascript:;" id="playid" onclick="playNextPic(true);">幻灯播放</a><!--{/if}--><span id="displayNum"></span></div>
	<!--{if $album[picnum]}-->当前第 $sequence 张<span class="pipe">|</span>共 $album[picnum] 张图片<span class="pipe">|</span><!--{/if}-->
	<a href="space.php?uid=$pic[uid]&do=$do&id=$pic[albumid]">返回相册</a>
	<!--{if $album['friend']}-->
		<span class="locked gray">
		<!--{if $album['friend'] == 1}-->仅好友可见<!--{/if}-->
		<!--{if $album['friend'] == 2}-->指定好友可见<!--{/if}-->
		<!--{if $album['friend'] == 3}-->仅自己可见<!--{/if}-->
		<!--{if $album['friend'] == 4}-->凭密码可见<!--{/if}-->
		</span>
	<!--{/if}-->
</div>

<div class="d_content">
	<div class="photobox">
		<a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=down"><img src="$pic[pic]" alt="$pic[title]" /></a>
	</div>

	<table cellspacing="0" cellpadding="0" class="infotable photo_info">
		<tr><td>$pic[title]</td></tr>
		<tr><th>上传于 <!--{date('Y-m-d H:i',$pic[dateline])}--> ($pic[size])</th></tr>
	</table>
	
	<!--{if isset($_GET['exif'])}-->
	<table cellspacing="0" cellpadding="0" class="infotable photo_info">
	<!--{if $exifs}-->
	<!--{loop $exifs $key $value}-->
	<!--{if $value}--><tr><th>$key &nbsp;</th><td>$value</td></tr><!--{/if}-->
	<!--{/loop}-->
	<!--{else}-->
	<tr><td>无EXIF信息</td></tr>
	<!--{/if}-->
	</table>
	<!--{/if}-->
	
	<br />
</div>

<div class="l_content s_clear">
	<div class="wide">
			
		<div class="post_list a_list" id="comment">
			<!--{if $cid}-->
			<div class="notice">
				当前只显示与你操作相关的单个评论，<a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]#comment">点击此处查看全部评论</a>
			</div>
			<!--{/if}-->
		
			<ul id="comment_ul">
			<!--{loop $list $value}-->
				<!--{template space_comment_li}-->
			<!--{/loop}-->
			</ul>
		</div>
		<div class="page">$multi[html]</div>
		
		<form id="commentform" name="commentform" action="cp.php?ac=comment" method="post" class="quickpost" style="padding-bottom: 1em;">
			<h3>评论</h3>
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td><textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="5" cols="60" style="width: 380px;"></textarea></td>
				</tr>
				<tr>
					<td>
					<input type="hidden" name="refer" value="space.php?uid=$pic[uid]&do=$do&picid=$pic[picid]" />
					<input type="hidden" name="id" value="$picid">
					<input type="hidden" name="idtype" value="picid">
					<input type="hidden" name="commentsubmit" value="true">
					<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="评论" onclick="ajaxpost('commentform', 'comment_status', 'comment_add')" />
					<span id="comment_status"></span>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div class="narrow">
		<div class="box">
		
			<ul class="line_list blocklink">
			<li><a href="$pic[pic]" target="_blank">新窗口查看原图</a></li>
		<!--{if !isset($_GET['exif'])}-->
			<li><a href="space.php?uid=$pic[uid]&do=$do&picid=$pic[picid]&exif">显示图片EXIF信息</a></li>
		<!--{/if}-->
		<!--{if $pic[uid]==$_SGLOBAL[supe_uid]}-->
			<li><a href="cp.php?ac=album&op=editpic&albumid=$pic[albumid]&picid=$pic[picid]">编辑图片</a></li>
		<!--{/if}-->		
			</ul>
		
		</div>
	</div>
<!--{if empty($album[friend])}-->
</div>
<div class="f_status s_clear">
	<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
	<a href="cp.php?ac=share&type=pic&id=$pic[picid]" id="a_share" onclick="ajaxmenu(event, this.id, 99999,'' , -1)">分享</a>
<!--{/if}-->
</div>
<script type="text/javascript">
<!--
	var interval = 5000;
	var timerId = -1;
	var derId = -1;
	var replay = false;
	var num = 0;
	var endPlay = false;
	function forward() {
		window.location.href = 'space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=down&play=1';
	}
	function derivativeNum() {
		num++;
		$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
	}
	function playNextPic(stat) {
		if(stat || replay) {
			derId = window.setInterval('derivativeNum();', 1000);
			$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
			$('playid').innerHTML = '停止播放';
			timerId = window.setInterval('forward();', interval);
		} else {
			replay = true;
			num = 0;
			if(endPlay) {
				$('playid').innerHTML = '重新播放';
			} else {
				$('playid').innerHTML = '幻灯播放';
			}
			$('displayNum').innerHTML = '';
			window.clearInterval(timerId);
			window.clearInterval(derId);
		}
	}
	<!--{if $_GET['play']}-->
	<!--{if $sequence && $album['picnum']}-->
	if($sequence == $album[picnum]) {
		endPlay = true;
		playNextPic(false);
	} else {
		playNextPic(true);
	}
	<!--{else}-->
	playNextPic(true);
	<!--{/if}-->
	<!--{/if}-->
//-->
</script>
<!--{template footer}-->